const mixin ={
  data(){
    return{
      apiUrl:{
        mogenUserLogin:'/mogen/user/login',
        mogenApiSearch:'/mogen/api/search',
        mogenApiQuery:'/mogen/api/query',
        mogenApiEdit:'/mogen/api/edit',
        mogenApiDelete:'/mogen/api/delete',
        mogenApiImport:'http://mogen.dmxiaoshuo.cn/mogen/api/import'
      }
    }
  },
  methods:{
      // 存储storage用户信息
      set_storage(str, val) {
          sessionStorage.setItem(str, val);
      },
      //设置cookie
      setCookie: function (cname, cvalue, exdays) {
        var d = new Date();
        d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
        var expires = 'expires=' + d.toUTCString();
        var domain = 'domain=' + 'kyhddsp.com';
        // console.info(cname + '=' + cvalue + '; ' + expires);
        document.cookie = cname + '=' + cvalue + '; ' + expires + '; ' + domain;
        // console.log(document.cookie);
      },
  }
}
export default mixin;